<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="ibox-content">
    <form class="form-horizontal m-t" id="signupForm">

        <div class="form-group">
            <label class="col-sm-2 control-label">自动录入数据开关：</label>
            <div class="col-sm-4">
                <sys:dict type="inputs_set_status" id="status" name="status"
                          th:value="${inputsSetDO.status}" class="form-control"/>
            </div>
            <label class="col-sm-2 control-label">批次：</label>
            <div class="col-sm-4">
                <input id="batchNum" name="batchNum" th:value="${inputsSetDO.batchNum}"
                       class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">生日：</label>
            <div class="col-sm-4">
                <input id="birthday" name="birthday"
                       th:value="${#dates.format(inputsSetDO.birthday,'yyyy-MM-dd')}"
                       class="form-control" type="text">
            </div>
            <label class="col-sm-2 control-label">种类：</label>
            <div class="col-sm-4">
                <sys:dict type="animal_type" id="typeName" name="typeName"
                          th:value="${inputsSetDO.typeName}" class="form-control" firstValue=""
                          firstText="请选择种类" onchange="base.dict.resetDict('typeName','varietyName')"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">品种：</label>
            <div class="col-sm-4">
                <sys:dict type="animal_varieties" id="varietyName" name="varietyName"
                          class="form-control" th:value="${inputsSetDO.varietyName}" firstValue=""
                          firstText="请选择品种"/>
            </div>
            <label class="col-sm-2 control-label">养殖状态：</label>
            <div class="col-sm-4">
                <sys:dict type="inputs_status" id="inputStatus" name="inputStatus"
                          class="form-control" th:value="${inputsSetDO.inputStatus}" firstValue=""
                          firstText="请选择养殖状态"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">最初体重：</label>
            <div class="col-sm-4">
                <input id="initWeight" name="initWeight" th:value="${inputsSetDO.initWeight}"
                       class="form-control" type="text">
            </div>
            <label class="col-sm-2 control-label">目前体重：</label>
            <div class="col-sm-4">
                <input id="curWeight" name="curWeight" th:value="${inputsSetDO.curWeight}"
                       class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">养殖户：</label>
            <div class="col-sm-4">
                <input id="deptId" name="deptId" th:value="${inputsSetDO.deptId}" readonly
                       class="form-control" type="hidden">
                <input th:value="${sysDepts[inputsSetDO?.deptId]?.name}" readonly class="form-control"
                       type="text">
            </div>
            <label class="col-sm-2 control-label">入住场地：</label>
            <div class="col-sm-4">
                <sys:dict th:onload="'get:animal/space/dict/list?cDeptId='+${session.sysUser.deptId}"
                          th:value="${inputsSetDO.spaceId}" superValueText="deptId" valueText="id"
                          nameText="name" id="spaceId" name="spaceId"
                          class="form-control" style="" firstValue="" firstText="请选择场地"/>

            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">供应商：</label>
            <div class="col-sm-4">
                <sys:dict th:onload="'get:animal/supplier/dict/list?cDeptId='+${session.sysUser.deptId}"
                          th:value="${inputsSetDO.supplierId}" superValueText="deptId" valueText="id"
                          nameText="name" id="supplierId" name="supplierId"
                          class="form-control" style="" firstValue="" firstText="请选择供应商"/>

            </div>
            <label class="col-sm-2 control-label">其他信息：</label>
            <div class="col-sm-4">
                <input id="otherInfo" name="otherInfo" th:value="${inputsSetDO.otherInfo}"
                       class="form-control" type="text">
            </div>
        </div>

        <div class="form-group" style="margin-top: 40px">
            <div class="col-xs-3 col-xs-offset-5">
                <button type="button" class="btn btn-primary" onclick="updateInputSet()">提交</button>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" th:src="${'js/appjs/animal/inputs/set.js?random='+#strings.randomAlphanumeric(9)}">
</script>
</body>
</html>
